static char SccsId[] = "@(#)aslsnscd.c	1.4   10/6/95";
/*
 *         Copyright (c) KUBOTA Corporation and HUDSON SOFT,
 *                  1994, 1995 All Rights Reserved
 *
 *  This software comprises unpublished confidential information of
 *  KUBOTA Corp. and HUDSON SOFT. It may not be used, copied or made
 *  available to anyone, except in accordance with the license under
 *  which it is furnished.
 */

#define	_ASLLIB_
#define	_ASLSNSCD_C_

#include <farl.h>
#include <asl.h>


/*----------------------------------------------------------------------------*/
unsigned short
ASLSenseCollisionDetectionResult( int index )
{
#if defined( __ASL_DEPEND_ON_FARL )
	return ( ( FarlGetMemReg( FARL_CD_RESULT_REG0 + ( index / 4 ) * 2 )
					>> ( ( index % 4 ) * 4 ) ) & 0x000f );
#else
	register unsigned int	*CDReg = (unsigned int *)FARL_CD_RESULT_REG0;

	return ( ( *CDReg >> ( index << 2 ) ) & 0x000f );
#endif
}

/*----------------------------------------------------------------------------*/
